import Vue from 'vue'
import Router from 'vue-router'
import bookuser from '@/components/BookUser'
import booknove from '@/components/BookNove'
import bookcategory from '@/components/BookCategory'
import main from '@/components/Main'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: '/',
            component: () => import("../components/Login")
        },
        {
            path: '/main',
            name: 'main',
            component:()=>import("../components/Main"),
            meta:{
              title:'后台管理'
            },
            children:[
                {
                path: '/bookuser',
                name: 'bookuser',
                component:()=>import("../components/BookUser"),
                    meta:{
                        title:'用户管理'
                    },
                },
                {
                    path: '/booknove',
                    name: 'booknove',
                    component:()=>import("../components/BookNove"),
                    meta:{
                        title:'小说管理'
                    },
                },
                {
                    path: '/bookcategory',
                    name: 'bookcategory',
                    component:()=>import("../components/BookCategory"),
                    meta:{
                        title:'小说管理'
                    },
                },
            ]
        },
    ]
})
